package com.ygqh.baby.model;

import com.ygqh.baby.utils.DateConvertUtils;
import org.apache.solr.client.solrj.beans.Field;

import java.io.Serializable;
import java.util.Date;

/**
 * @author (guohao)
 * @version V1.0
 * @ClassName: ProductInfoForSolr
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @date 2018年6月14日 下午2:25:04
 */
public class ProductInfoForSolr implements Serializable {

    private static final long serialVersionUID = -2100667466934076306L;

    @Field
    private Long id;

    @Field
    private Long supplierId;

    @Field
    private Long categoryId;

    @Field
    private String productName;

    @Field
    private String productCode;

    @Field
    private String shortName;

    @Field
    private String productOriginalPrice;

    @Field
    private String productSalePrice;

    @Field
    private String newCustomPrice;

    @Field
    private String imageUrl;

    @Field
    private String saleStatus;

    @Field
    private String promotionPrice;

    @Field
    private String vipPrice;

    @Field
    private String productType;

    private Date pSaleDate;
    @Field
    private String preSaleDate;

    private Date sTime;

    @Field
    private String saleTime;

    @Field
    private String gender;

    @Field
    private Long saleNum;

    @Field
    private Long commentNum;

    @Field
    private String tags;
    @Field
    private String basicAttribute;
    @Field
    private String categoryNames;
    @Field
    private String promotionTag;
    @Field
    private String productCombinationId;
    @Field
    private String shareRate;
    @Field
    private String distributionPrice;
    @Field
    private String productSecondPrice;

    @Field
    private String salesPlatform;

    @Field
    private String sellingPoint;

    @Field
    private Double sortSalePrice;

    @Field
    private Long groupId;

    @Field
    private Long primaryCategoryId;

    @Field
    private Long secondaryCategoryId;

    @Field
    private String sendType;

    public ProductInfoForSolr() {
        super();
    }

    public ProductInfoForSolr(Long id, Long supplierId, Long categoryId, String productName, String productCode, String shortName, String productOriginalPrice,
                              String productSalePrice, String newCustomPrice, String imageUrl, String saleStatus, String promotionPrice, String vipPrice, String productType,
                              Date preSaleDate, Date saleTime, String gender, Long saleNum, Long commentNum, String tags) {
        super();
        this.id = id;
        this.supplierId = supplierId;
        this.categoryId = categoryId;
        this.productName = productName;
        this.productCode = productCode;
        this.shortName = shortName;
        this.productOriginalPrice = productOriginalPrice;
        this.productSalePrice = productSalePrice;
        this.newCustomPrice = newCustomPrice;
        this.imageUrl = imageUrl;
        this.saleStatus = saleStatus;
        this.promotionPrice = promotionPrice;
        this.vipPrice = vipPrice;
        this.productType = productType;
        this.pSaleDate = preSaleDate;
        this.sTime = saleTime;
        this.gender = gender;
        this.saleNum = saleNum;
        this.commentNum = commentNum;
        this.tags = tags;
        this.setPreSaleDate(pSaleDate == null ? null : DateConvertUtils.format(pSaleDate));
        this.setSaleTime(sTime == null ? null : DateConvertUtils.formatDateTime(sTime));
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public Long getSaleNum() {
        return saleNum;
    }

    public void setSaleNum(Long saleNum) {
        this.saleNum = saleNum;
    }

    public Long getCommentNum() {
        return commentNum;
    }

    public void setCommentNum(Long commentNum) {
        this.commentNum = commentNum;
    }

    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public Long getId() {
        return id;
    }

    public String getSaleStatus() {
        return saleStatus;
    }

    public void setSaleStatus(String saleStatus) {
        this.saleStatus = saleStatus;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    public String getProductType() {
        return productType;
    }

    public void setProductType(String productType) {
        this.productType = productType;
    }

    public String getProductSalePrice() {
        return productSalePrice;
    }

    public void setProductSalePrice(String productSalePrice) {
        this.productSalePrice = productSalePrice;
    }

    public String getNewCustomPrice() {
        return newCustomPrice;
    }

    public void setNewCustomPrice(String newCustomPrice) {
        this.newCustomPrice = newCustomPrice;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public String getPromotionPrice() {
        return promotionPrice;
    }

    public void setPromotionPrice(String promotionPrice) {
        this.promotionPrice = promotionPrice;
    }

    public String getVipPrice() {
        return vipPrice;
    }

    public void setVipPrice(String vipPrice) {
        this.vipPrice = vipPrice;
    }

    public String getProductOriginalPrice() {
        return productOriginalPrice;
    }

    public void setProductOriginalPrice(String productOriginalPrice) {
        this.productOriginalPrice = productOriginalPrice;
    }

    public String getShortName() {
        return shortName;
    }

    public void setShortName(String shortName) {
        this.shortName = shortName;
    }

    public Date getpSaleDate() {
        return pSaleDate;
    }

    public void setpSaleDate(Date pSaleDate) {
        this.pSaleDate = pSaleDate;
        this.setPreSaleDate(pSaleDate == null ? null : DateConvertUtils.format(pSaleDate));
    }

    public String getPreSaleDate() {
        return pSaleDate == null ? null : DateConvertUtils.format(pSaleDate);
    }

    public void setPreSaleDate(String preSaleDate) {
        this.preSaleDate = preSaleDate;
    }

    public Date getsTime() {
        return sTime;
    }

    public void setsTime(Date sTime) {
        this.sTime = sTime;
        this.setSaleTime(sTime == null ? null : DateConvertUtils.formatDateTime(sTime));
    }

    public String getSaleTime() {
        return sTime == null ? null : DateConvertUtils.formatDateTime(sTime);
    }

    public void setSaleTime(String saleTime) {
        this.saleTime = saleTime;
    }

    public String getBasicAttribute() {
        return basicAttribute;
    }

    public void setBasicAttribute(String basicAttribute) {
        this.basicAttribute = basicAttribute;
    }

    public String getPromotionTag() {
        return promotionTag;
    }

    public void setPromotionTag(String promotionTag) {
        this.promotionTag = promotionTag;
    }

    public String getProductCombinationId() {
        return productCombinationId;
    }

    public void setProductCombinationId(String productCombinationId) {
        this.productCombinationId = productCombinationId;
    }

    public String getShareRate() {
        return shareRate;
    }

    public void setShareRate(String shareRate) {
        this.shareRate = shareRate;
    }

    public String getCategoryNames() {
        return categoryNames;
    }

    public void setCategoryNames(String categoryNames) {
        this.categoryNames = categoryNames;
    }

    public String getDistributionPrice() {
        return distributionPrice;
    }

    public void setDistributionPrice(String distributionPrice) {
        this.distributionPrice = distributionPrice;
    }

    public String getProductSecondPrice() {
        return productSecondPrice;
    }

    public void setProductSecondPrice(String productSecondPrice) {
        this.productSecondPrice = productSecondPrice;
    }

    public String getSalesPlatform() {
        return salesPlatform;
    }

    public void setSalesPlatform(String salesPlatform) {
        this.salesPlatform = salesPlatform;
    }

    public String getSellingPoint() {
        return sellingPoint;
    }

    public void setSellingPoint(String sellingPoint) {
        this.sellingPoint = sellingPoint;
    }

    public Double getSortSalePrice() {
        return sortSalePrice;
    }

    public void setSortSalePrice(Double sortSalePrice) {
        this.sortSalePrice = sortSalePrice;
    }

    public Long getGroupId() {
        return groupId;
    }

    public void setGroupId(Long groupId) {
        this.groupId = groupId;
    }

    public Long getPrimaryCategoryId() {
        return primaryCategoryId;
    }

    public void setPrimaryCategoryId(Long primaryCategoryId) {
        this.primaryCategoryId = primaryCategoryId;
    }

    public Long getSecondaryCategoryId() {
        return secondaryCategoryId;
    }

    public void setSecondaryCategoryId(Long secondaryCategoryId) {
        this.secondaryCategoryId = secondaryCategoryId;
    }

    public String getSendType() {
        return sendType;
    }

    public void setSendType(String sendType) {
        this.sendType = sendType;
    }

    @Override
    public String toString() {
        return "ProductInfoForSolr{" +
                "id=" + id +
                ", supplierId=" + supplierId +
                ", categoryId=" + categoryId +
                ", productName='" + productName + '\'' +
                ", productCode='" + productCode + '\'' +
                ", shortName='" + shortName + '\'' +
                ", productOriginalPrice='" + productOriginalPrice + '\'' +
                ", productSalePrice='" + productSalePrice + '\'' +
                ", newCustomPrice='" + newCustomPrice + '\'' +
                ", imageUrl='" + imageUrl + '\'' +
                ", saleStatus='" + saleStatus + '\'' +
                ", promotionPrice='" + promotionPrice + '\'' +
                ", vipPrice='" + vipPrice + '\'' +
                ", productType='" + productType + '\'' +
                ", pSaleDate=" + pSaleDate +
                ", preSaleDate='" + preSaleDate + '\'' +
                ", sTime=" + sTime +
                ", saleTime='" + saleTime + '\'' +
                ", gender='" + gender + '\'' +
                ", saleNum=" + saleNum +
                ", commentNum=" + commentNum +
                ", tags='" + tags + '\'' +
                ", basicAttribute='" + basicAttribute + '\'' +
                ", categoryNames='" + categoryNames + '\'' +
                ", promotionTag='" + promotionTag + '\'' +
                ", productCombinationId='" + productCombinationId + '\'' +
                ", shareRate='" + shareRate + '\'' +
                ", distributionPrice='" + distributionPrice + '\'' +
                ", productSecondPrice='" + productSecondPrice + '\'' +
                ", salesPlatform=" + salesPlatform +
                ", sellingPoint=" + sellingPoint +
                ", groupId=" + groupId +
                ", primaryCategoryId=" + primaryCategoryId +
                ", secondaryCategoryId=" + secondaryCategoryId +
                ", sendType=" + sendType +
                '}';
    }
}